package main

import (
	"gcopyright/main/initApp"
	"gcopyright/models"
	"gcopyright/route"
	"github.com/kataras/iris"
	"log"
)

func main() {
	models.InitDB() //初始化sqlite3
	app := initApp.NewApp()
	route.InitRouter(app)
	err := app.Run(iris.Addr(":3000"), iris.WithConfiguration(iris.YAML("./conf/iris.yaml")))
	if err != nil {
		log.Fatal(err)
	}
}
